package com.Enum;

/**
 * 订单状态 0待付款，1已付款，2待发货，4待确认收货，5已收货，6待评价，7已评价
 * */
public enum OrderStatusEnum {

    WAIT_PAY(0){
        public String toString(){ return "待付款"; }
    },
    PAYMENT(1){
        public String toString(){ return "已付款"; }
    },
    WAIT_SEND(2){
        public String toString(){ return "待发货"; }
    };
    private final int val;

    OrderStatusEnum(int v){val=v;}

    public int getIntValue() {
        return val;
    }

    public static OrderStatusEnum getByStringValue(int v){
        switch (v){
            case 0:
                return WAIT_PAY;
            case 1:
                return PAYMENT;
            default:
                return WAIT_SEND;

        }
    }

}
